package com.wetool.wechat.model.official.message.event;


import com.wetool.wechat.model.official.EventType;
import com.wetool.wechat.model.official.MessageType;
import com.wetool.wechat.model.official.message.AbstractMessage;
import lombok.Getter;
import lombok.Setter;

import javax.xml.bind.annotation.XmlElement;

/**
 * 微信消息类型
 */
@Getter
@Setter
public abstract class AbstractEvent extends AbstractMessage {


    /**
     * 事件类型
     */
    @XmlElement(name = "Event")
    protected EventType event;

    public AbstractEvent() {
    }

    public AbstractEvent(String toUserName, String fromUserName, int createTime, MessageType msgType, EventType event) {
        this.toUserName = toUserName;
        this.fromUserName = fromUserName;
        this.createTime = createTime;
        this.msgType = msgType;
        this.event = event;
    }
}
